@im-nobsidian/core 0.1.12 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -0
- package/dist/index.d.ts +492 -64
- package/dist/index.js +2103 -936
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# @im-nobsidian/core
|
|
2
|
+
|
|
3
|
+
> Core sync engine for [Im-Nobsidian](https://github.com/JaylenAI/Im-Nobsidian) — the only true bidirectional sync between Obsidian and Notion.
|
|
4
|
+
|
|
5
|
+
<p>
|
|
6
|
+
<a href="https://www.npmjs.com/package/@im-nobsidian/core"><img src="https://img.shields.io/npm/v/@im-nobsidian/core" alt="npm version" /></a>
|
|
7
|
+
<a href="https://github.com/JaylenAI/Im-Nobsidian/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT" /></a>
|
|
8
|
+
<a href="https://nodejs.org"><img src="https://img.shields.io/badge/Node.js-20%2B-green" alt="Node.js" /></a>
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
The programmable engine behind the `nobsi` CLI and the Im-Nobsidian Obsidian plugin — importable directly for custom integrations. Markdown ↔ Notion conversion (25+ block types, round-trip markers for lossless preservation), frontmatter ↔ property mapping (21 read / 15 write types), 3-way conflict resolution, and incremental sync orchestration.
|
|
12
|
+
|
|
13
|
+
## Install
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install @im-nobsidian/core
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
ESM only, Node.js 20+.
|
|
20
|
+
|
|
21
|
+
## Modules
|
|
22
|
+
|
|
23
|
+
- **`converter/`** — Markdown ↔ Notion conversion. `createDefaultPipeline()`; preserve markers keep Notion-only blocks, colors and underlines lossless on round-trip.
|
|
24
|
+
- **`notion/`** — `NotionClient` (official SDK, 3 req/s rate limit), `NotionBlockBuilder`, `PropertyMapper`.
|
|
25
|
+
- **`sync/`** — `SyncOrchestrator` (pull / push / sync), `DatabaseSyncer`.
|
|
26
|
+
- **`state/`** — `StateDB` sync-state database (`IStateDB` interface — better-sqlite3 in the CLI, sql.js in the plugin).
|
|
27
|
+
- **`conflict/`** — `threeWayMerge`, `ConflictResolver`.
|
|
28
|
+
- **`structure/`** — `TreeMapper` (folder tree ↔ page hierarchy).
|
|
29
|
+
- **`watcher/`** — `FileWatcher`, `WatchSyncService`.
|
|
30
|
+
- **`audit/`** — `classifyBodyFidelity`, `summarizeFidelity` (round-trip fidelity measurement).
|
|
31
|
+
|
|
32
|
+
## Usage
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
import { SyncOrchestrator, ConfigManager } from "@im-nobsidian/core";
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
The engine is configuration-driven (Notion token, root page, vault path). For an end-to-end reference, see the [`nobsi` CLI](https://www.npmjs.com/package/im-nobsidian) — a thin wrapper over this package.
|
|
39
|
+
|
|
40
|
+
## Documentation
|
|
41
|
+
|
|
42
|
+
[Repo](https://github.com/JaylenAI/Im-Nobsidian#readme) · [Architecture](https://github.com/JaylenAI/Im-Nobsidian/tree/main/docs/02-architecture) · [Changelog](https://github.com/JaylenAI/Im-Nobsidian/blob/main/docs/06-devlog/CHANGELOG.md)
|
|
43
|
+
|
|
44
|
+
## License
|
|
45
|
+
|
|
46
|
+
MIT © hanseungheon
|